<template>
  <div id="app">
 	 	<!--头部-->
  	 <app-header v-if="header_show"></app-header>
    <router-view v-on:public_header="public_header" v-on:public_footer="public_footer"></router-view>
    <app-footer v-if="footer_show"></app-footer>
  
  	
  </div>
</template>

<script>
import myhead from '@/components/common/myhead'
import myfooter from '@/components/common/myfooter'

export default {
  name: 'App',
  data(){
      return {
          header_show:true,
          footer_show:true,
 
      }
  },
  components: {
        'app-header':myhead,
        'app-footer':myfooter,
  },
  methods:{
      //是否显示头部
      public_header:function (bool) {
        this.header_show = bool;
      },
      //是否显示底部
      public_footer:function (bool) {
          this.footer_show = bool;
      }
  }
}

</script>

<style>
  #app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

</style>
